fix(ranking): remove 100-image hard limit blocking ranking round submission#495
Open
ayushshukla1807 wants to merge 1 commit intohatnote:masterfrom
Open
fix(ranking): remove 100-image hard limit blocking ranking round submission#495ayushshukla1807 wants to merge 1 commit intohatnote:masterfrom
ayushshukla1807 wants to merge 1 commit intohatnote:masterfrom
Conversation
…ission (hatnote#363) - MAX_RATINGS_SUBMIT (100) was incorrectly used as the task fetch count for ranking rounds, causing rounds with >100 images to only load 100 tasks. - The subsequent all-or-nothing validation would then always fail with: 'must submit all rankings at once. (expected N, got 100.)' - Fix: introduce MAX_RANKING_TASKS = 2000 for task retrieval on ranking rounds. - Move the bulk-submit guard to after round lookup so vote_method is available. - Rating/yesno rounds retain the 100-per-batch limit; ranking rounds are exempt since they must submit the full ballot atomically regardless of size. Fixes hatnote#363
Author
|
Just pushed the fix and ran the test suite locally against this branch. Everything looks good. I've also attached a quick visual showing the backend running properly during the tests so you guys can verify the local state: |
Author
📸 Local Dev Environment — Screenshot ProofTests run with backend live at 🖼️ View screenshots (backend API running)
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #363.
Ranking rounds were failing to submit if there were over 100 images. This happened because
MAX_RANKING_TASKSwas hardcoded to 100, andget_tasks_from_roundwas slicing the workload down to 100 as well.I've bumped the hardcoded limit up to 2000 (enough to cover the upper edge case) and updated the task fetcher to pull everything required for a ranking round.